<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="无法在MySQL/GreatSQL数据库主机/usr/bin目录下找到mysql、mysqlbinlog、mysqldump和mysqladmin工具">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="mysql-0105.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="">
  <meta name="DC.Publisher" content="20250306">
  <meta name="documenttype" content="usermanual">
  <meta name="prodname" content="csbs">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="mysql-0110">
  <meta name="DC.Language" content="zh-cn">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>无法在MySQL/GreatSQL数据库主机/usr/bin目录下找到mysql、mysqlbinlog、mysqldump和mysqladmin工具</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="mysql-0110"></a><a name="mysql-0110"></a>
  <h1 class="topictitle1">无法在MySQL/GreatSQL数据库主机/usr/bin目录下找到mysql、mysqlbinlog、mysqldump和mysqladmin工具</h1>
  <div>
   <div class="section">
    <h4 class="sectiontitle">现象描述</h4>
    <p>MySQL/GreatSQL数据库备份失败，报错：“未找到可用的配置文件或无法在MySQL/GreatSQL主机/usr/bin目录下找到mysql、mysqlbinlog、mysqldump和mysqladmin工具。”</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">可能原因</h4>
    <p><span style="color:#242424;">MySQL</span>/GreatSQL数据库<span style="color:#242424;">可能未安装在</span><span style="color:#242424;">/usr/bin</span><span style="color:#242424;">目录下，并且未通过软连接的方式配置</span><span style="color:#242424;">mysql</span><span style="color:#242424;">、</span><span style="color:#242424;">mysqlbinlog</span><span style="color:#242424;">、</span><span style="color:#242424;">mysqldump</span><span style="color:#242424;">和</span><span style="color:#242424;">mysqladmin</span><span style="color:#242424;">工具。</span></p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">处理步骤</h4>
    <ol>
     <li><span>登录MySQL/GreatSQL数据库主机节点。</span></li>
     <li><span>执行<strong>which mysql</strong>命令，找到MySQL/GreatSQL数据库安装路径，此处以<span style="color:#242424;">/mysqlpath</span>为例。</span></li>
     <li><span>依次执行以下命令，建立<span style="color:#242424;">MySQL</span><span style="color:#242424;">命令软连接</span>。</span><p></p><pre class="screen"><span style="color:#242424;">ln -s /mysqlpath/bin/mysql /usr/bin/mysql</span>
<span style="color:#242424;">ln -s /mysqlpath/bin/mysqlbinlog /usr/bin/mysqlbinlog</span>
<span style="color:#242424;">ln -s /mysqlpath/bin/mysqldump /usr/bin/mysqldump</span>
<span style="color:#242424;">ln -s /mysqlpath/bin/mysqladmin /usr/bin/mysqladmin</span></pre> <p></p></li>
     <li><span>分别执行以下命令并查看回显，回显无报错，表示设置成功。</span><p></p><pre class="screen">mysql --version
mysqlbinlog --version
mysqldump --version
mysqladmin --version</pre> <p></p></li>
    </ol>
   </div>
   <div class="section">
    <h4 class="sectiontitle">建议与总结</h4>
    <p>无。</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">参考信息</h4>
    <p>无。</p>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>父主题：</strong> <a href="mysql-0105.html">常见问题</a>
    </div>
   </div>
  </div>
 </body>
</html>